package com.jk.admin.entity;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 商品bean，对应t_product
 */
@Data
@Document(indexName = "product", type = "action")
public class Product {
	@Id
	@Field(type = FieldType.Text)
	private String  product_id;

	@Field(type = FieldType.Text, analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
	private String  product_name;

	@Field(type = FieldType.Double)
	private Double  product_price;

	private String  product_category;//类型

	@Field(type = FieldType.Text)
	private String  product_imgurl;

	@Field(type = FieldType.Integer)
	private Integer product_num = 0;

	@Field(type = FieldType.Text, analyzer = "ik_max_word")
	private String  product_description;

	@Field(type = FieldType.Integer)
	private Integer product_recommend;

	private Integer tid;

	private String minprice;
	private String maxprice;
	private String typename;

}
